package cn.cyty.midway.financial.po;

import java.util.Date;

import cn.cyty.midway.user.po.Member;

import com.tuweisoft.tt.potts.pump.oo.annotion.Entity;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.Primarykey;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.choose.Item;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.choose.PBoolean;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.num.Money;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.text.Text;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.time.PTimestamp;
import com.tuweisoft.tt.potts.pump.oo.runtime.PumpObject;

@Entity(id="T_LIQUIDITY", title="财务流水", dataField="id")
public class Liquidity implements PumpObject {

	private static final long serialVersionUID = -7194022080200276066L;

	@Text(id="LIQUIDITY_ID", title="编号", minLength=64, required=true, unique=true)
	@Primarykey
	private String id;
	
	@Item(id="LIQUIDITY_MEMBER", title="会员")
	private Member member;
	
	@Money(id="LIQUIDITY_BALANCE", title="余额", required=true)
	private float balance;
	
	@PTimestamp(id="LIQUIDITY_TIME", title="时间")
	private Date time;
	
	@Item(id="LIQUIDITY_TYPE", title="类型")
	private FinancialType type;
	
	@Item(id="LIQUIDITY_SUBJECT", title="财务科目")
	private FinancialSubject subject;
	
	@PBoolean(id="LIQUIDITY_RESULT", title="结果")
	private boolean result;
	
	@Item(id="LIQUIDITY_DEST", title="目的账号")
	private Member dest;
	
	@Text(id="LIQUIDITY_NOTE", title="备注")
	private String note;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Member getMember() {
		return member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	public float getBalance() {
		return balance;
	}

	public void setBalance(float balance) {
		this.balance = balance;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public FinancialType getType() {
		return type;
	}

	public void setType(FinancialType type) {
		this.type = type;
	}

	public FinancialSubject getSubject() {
		return subject;
	}

	public void setSubject(FinancialSubject subject) {
		this.subject = subject;
	}

	public boolean isResult() {
		return result;
	}

	public void setResult(boolean result) {
		this.result = result;
	}

	public Member getDest() {
		return dest;
	}

	public void setDest(Member dest) {
		this.dest = dest;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

}
